<template>
  <div>

      <div class="layui-row layui-col-space15">
          <div class="layui-col-md24">
              <div class="home-tips shadow" style="background:rgb(230, 230, 230);">
                  <div class="home-tips-container" style="    height: auto;">
                      <div class="demoTable">
                          <div class="layui-inline" style="width:90%">
                              <input class="layui-btn layui-btn-sm" type="text" v-model="pageconfig.search.title" placeholder="搜索" style="text-align: left;color: #009688; background-color: #fff;width:100%">
                          </div>
                          <button class="layui-btn layui-btn-sm" @click="a_search()">搜索</button>
                      </div>
                  </div>
              </div>
          </div>
          <!--左边文章列表-->
          <div class="layui-col-md16">
            <blog  :data="pageconfig.data"></blog>
             <lay-page @change="change" v-model="pageconfig.page"  theme="blue" :limit="pageconfig.limit" :total="pageconfig.total" :show-page="true"></lay-page>
           
          </div>
          <div class="layui-col-md8">

            <randomnew></randomnew>

            <music></music>
               <div class="layui-col-sm12 layui-col-md24 padding0">
                      <div class="blog-card shadow">
        
                   <taobao></taobao>

      
                </div>
            </div>
          </div>
       
   

  </div>
  
  </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import blog from '../../components/card/blog.vue';
import http from 'webosutils/lib/http';
import taobao from '../../components/card/taobao.vue';
import music from '../../components/card/music.vue';
import applet from '../../components/card/applet.vue';
import randomnew from '../../components/card/randomnew.vue';
const newsmian=ref({data:[],title:''}) as any;
const pageconfig=ref({
  limit:10,
  page:1,
  total:0,
  search:{
    title:""
  },
  data:{title:"",data:[]}
});
const ajax = () => {

http.post("/v1/api/portalsite/GetNew", {title:pageconfig.value.search.title,type:'6E566654-1F82-4E75-933E-E9E364026456,A89CB100-0D20-4594-BB9C-A115F4EBDB7D,A89CB100-0D20-4594-BB9C-A115F4EBDB7D,6E566654-1F82-4E75-933E-E9E364026456,70895C54-2CAD-4BD2-BBC6-9BE4367551FA,9010EECE-E1C6-4FF5-B6ED-143F31600C37,979345C5-1C50-4811-92D8-5041F848170F,BD072816-E11F-4EB0-A4FD-45EA35810BDF,5E0EB9FD-7D46-4F93-825D-6730E98D88A4,B496AAC6-B704-4FCE-AD36-CACCEDF3232B,5D74ED82-CFD8-40E3-9879-196489798C92,24244800-AC73-43BC-9E8B-FEA34B296DF3,0E9DB988-F5DE-488B-BCFC-C46E9783CB8D',  page: pageconfig.value.page, limit: pageconfig.value.limit },"请稍等").then(res => {

    pageconfig.value.total=res.count;
    pageconfig.value.data.data = Object.freeze( res.data);
    pageconfig.value.data.title="我的博文";
    var win=window as any;
    win.scrollTo(0,0)

}).catch(res => {

})



}
ajax();
const change=( page:any)=>{
  debugger;
  pageconfig.value.page=page.current;
  pageconfig.value.limit=page.limit;
  ajax();
}
const a_search=()=>{
  pageconfig.value.page=1;
  ajax();
}

</script>
<style>
#so360{white-space:nowrap}
#so360 form{margin:0;padding:0}
#so360_keyword{width:307px;height:24px;line-height:24px;font:14px arial;padding:
2px 5px;margin-right:5px;border:2px solid #3EAF0E;outline:0;vertical-align:middle;}
#so360_keyword{background:url(https://p.ssl.qhimg.com/t01ab1a3fb05f0ee893.png)
no-repeat right center;}
#so360_submit{width:70px;height:32px;line-height:32px;border:0;color:#fff;
background:#3FB30E;font-weight:bold;font:bold 14px arial;padding:0;
padding-top:3px\9;cursor:pointer;
vertical-align:middle}
</style>